<template>
    <el-form :model="form" label-width="120px">
        <el-form-item label="图片地址">
            <el-input v-model="form.img" />
        </el-form-item>
    </el-form>
    <el-form :model="form" label-width="120px">
        <el-form-item label="图片提示">
            <el-input v-model="form.alt" />
        </el-form-item>
    </el-form>
    <el-form :model="form" label-width="120px">
        <el-form-item label="图片连接">
            <el-input v-model="form.link" />
        </el-form-item>
    </el-form>
    <el-form-item>
        <el-button type="primary" @click="onSubmit">添加</el-button>
    </el-form-item>
    
    
</template>
  
<script setup lang="ts">
import { reactive } from "vue"
import service from "../../../utils/service";
const form = reactive({
    img: "",
    alt: "",
    link: ""
})
const dell= reactive({
    bannerid:""
})
const onSubmit = () => {
    service({
        url: "banner/add",
        method: "post",
        data:form
    }).then((res)=>{
        if (res.data.code==="200") {
            alert("添加成功")
        }
    })
}

</script>
  
<style></style>